﻿using System.Collections.Generic;

namespace Sandy.Selectors
{
    // Path: client.SuperFamily("name")
    public class SuperFamilySelector : IFamilySelector
    {
        private readonly SandyClient _client;
        private readonly SandyFamily _family;

        internal SuperFamilySelector(SandyClient client, SandyFamily family)
        {
            _client = client;
            _family = family;
        }

        public SuperColumnGetSelector this[string key]
        {
            get
            {
                return new SuperColumnGetSelector(_client, _family, key);
            }
        }

        public RangeSuperColumnSelector this[IEnumerable<string> keys]
        {
            get
            {
                return new RangeSuperColumnSelector(_client, _family, keys);
            }
        }

        public RangeSuperColumnSelector this[params string[] keys]
        {
            get
            {
                return this[(IEnumerable<string>)keys];
            }
        }

        public RangeSuperColumnSelector this[KeyRange keyRange]
        {
            get
            {
                return new RangeSuperColumnSelector(_client, _family, keyRange);
            }
        }
    }
}